package com.example.home.model

import com.example.home.api.HomeApiServer
import com.example.network.ApiService
import com.example.network.HttpManager
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import javax.inject.Singleton

@Module//声明Hilt模块
@InstallIn(SingletonComponent::class)//作用范围Hilt使用范围
object HomeHiltModule {

    @Provides
    @Singleton
    fun getHomeApiServer() :HomeApiServer{
        return HttpManager.createApi(HomeApiServer::class.java)
    }

}